<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 求任意数的最大值
        function getMax() {
            // arguments内置对象
            var max = arguments[0];
            for (var i = 0; i < arguments.length; i++) {
                if (arguments[i] > max) {
                    max = arguments[i];
                }
            }
            // 返回值
            return max;
        }
        // 调用方法
        var value = getMax(11, 88, 998, 1998, 19998);
        alert(value);
    </script>
</body>

</html>